
<!--右侧内容开始-->
<div class="fadeIn">
<br/>
<ol class="breadcrumb">
<li class="active"><span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;<mainpage></mainpage></li>
<li class="active">运维工作台 / 参数配置管理 / 规则参数管理 / 条件短信管理</li>
</ol>

<div class="rightbar"> 
      <div id="serviceEnd" class="showEle sign1"> 
        <form action="affixRule/out-excel" method="post" id="form" name="myform">
          <div class="left marT15 marR10">
            <span class="search-name">业务端管理</span>
            <select class="form-control1" ng-change='getSms()'  ng-model="searchData.svrNode" name="svrNode">
                <option value="">全部</option>
                <option value={{row.SVR_NODE}} ng-repeat="row in listData1">{{row.SVR_NODE_NAME}}</option>
            </select>
          </div>
          <div class="left marR10 marT15">
            <span class="search-name">短信类型</span>
            <select class="form-control1 svrNode" ng-model="searchData.serviceCode" name="serviceCode">
                <option value="">全部</option>
                <option value={{row.serviceCode}} ng-repeat="row in listData2">{{row.serviceName}}</option>
            </select>
          </div>
          <form/>
          <a href="javascript:;" class=" btn btn-sm btn-primary left marT15 marR10" id="search" ng-click='search()'><span class="glyphicon glyphicon-search"></span></a>
          <div class="right marT15" style="position:relative">
            <button class="btn btn-sm btn-primary" ng-click='outExcel()'><img style="width:25px; height:20px;" src="img/excel.png">导出表格<span ng-style='loadStyle' class="outExcelLoad"><img  src="img/load.gif"></span>
            </button>
          </div>

     <div class="table-box">

          <table class="table table-bordered table-striped text-center bg-info marT15">
              <thead>
              <tr class="info">
                  <th class="text-center">序号</th>
                  <th class="text-center">附加条件短信名称</th>
                  <th class="text-center">业务端名称</th> 
                  <th class="text-center">短信类型名称</th>
                  <th class="text-center">附加内容</th>
                  <th class="text-center">回复短信</th> 
                  <th class="text-center">回复时效(小时)</th>
                  <th class="text-center">状态</th>
                  <th class="text-center">说明</th>
                  <th class="text-center">操作</th>
                   
              </tr>
              </thead>
              <tbody id="appList">
              <tr ng-repeat="Item in result"> 
                  <td>{{ $index+1 }}</td>
                  <td style="min-width: 130px">{{Item.affixRuleName}}</td>                                        
                  <td class="w115">{{Item.svrNodeName}}</td>
                  <td class="w115">{{Item.serviceName}}</td>
                  <td style="min-width: 200px; word-break: break-all;">{{Item.affixSm}}</td>                                        
                  <td class="w85">{{Item.moSm}}</td>
                  <td class="w85">{{Item.timeLen}}</td>
                  <td class="w115">
                    <span ng-if='"1"==Item.status' >有效</span>
                    <span ng-if='"0"==Item.status' >无效</span>
                  </td>
                  <td style="min-width: 200px; word-break: break-all;">{{Item.desc}}</td>
                  <td style="min-width: 160px;">
                      <a class="marR10" 
                            ng-click='changeStstus($index,Item.affixRuleId,Item.status)'
                            ng-show="'0'===Item.status">生效</a>
                            <a class="marR10" 
                            ng-click='changeStstus($index,Item.affixRuleId,Item.status)' 
                            ng-show="'1'===Item.status">失效</a>
                            <a class="marR10" data-toggle="modal" data-target="#add" ng-click="editTr('修改',Item.affixRuleId)">修改</a>
                            <a class="" data-toggle="modal" data-target="#delete" ng-click="delete(Item.affixRuleId,$index)">删除
                      </a>
                  </td>
              </tr>
             
              </tbody>
              <tfoot>
                <tr>
                 <td><a ng-click='editTr("添加")' class="glyphicon glyphicon-plus" data-toggle="modal" data-target="#add"></a></td>
                 <td></td>
                 <td></td>
                 <td></td>
                 <td></td>
                 <td></td>
                </tr>
             </tfoot>
           
          </table>
    </div>

           <page></page>
      </div>                          
  </div> 
  </div>
            <!--右侧内容结束-->
</div>
    
<!--添加程序弹窗-->
<div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="add">
    <div class="modal-dialog" role="document">
         <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" >{{popup}}条件短信内容</h4>
            </div>
            <div class="modal-body">
               <div class="marB15 clearfix row"> 
                   <span class="col-xs-6">
                      <label class="left"><span>条件短信名称 ：</span></label>
                      <input type="text" class="right line4 form-control" 
                      ng-model="addData.affixRuleName">
                   </span>
                  <span class="col-xs-6">
                     <label class="left"><span>业务端管理 ：</span></label>
                     <select class="form-control line4 right"  
                     ng-model="addData.svrNode"
                     ng-change="getServiceCode()" name="svrNode">
                        <option value="">--请选择--</option>
                        <option value={{row.SVR_NODE}} ng-repeat="row in listData1">{{row.SVR_NODE_NAME}}</option>
                    </select>
               </span>
               </div>
               <div class="marB15 clearfix row"> 
                  <span class="col-xs-6">
                  <label class="left"><span>短信类型 ：</span></label>
                  <select class="form-control line4 right" ng-model="addData.serviceCode">
                        <option value="">--请选择--</option>
                        <option value={{row.serviceCode}} ng-repeat="row in serviceList">{{row.serviceName}}</option>
                    </select>
                  </span>
                  <span class="col-xs-6">
                    <label class="left"><span>回复短信 ：</span></label>
                    <input type="text" class="right line4 form-control" ng-model="addData.moSm">
                   </span>
               </div>
               <div class="marB15 clearfix"> 
                   <span>
                       <label class="left"><span>附加短信内容 ：</span></label>
                        <textarea id="concent" style="width:542px" class="left form-control" ng-model="addData.affixSm"></textarea>
                   </span>
               </div>
               <div class="marB15 clearfix row"> 
                     <div class="col-xs-6" style="line-height: 25px;">
                       <label class="left"><span>回复时限 ：</span></label>
                       <label class="right" style="padding-left:10px;">小时</label>
                       <input id="timeLimit" type="text" style="width:135px" onkeyup="value=value.replace(/[^\d]/g,'') " class="form-control line3 right" ng-model="addData.timeLen">&nbsp;
                       
                    </div>
                   <div class="col-xs-6" style="line-height: 25px">
                       <label class="left"><span>状态 ：</span></label>
                       <select class="form-control line4 right" ng-model="addData.status">
                           <option value="0">待生效</option>
                           <option value="1">生效</option>
                       </select>
                   </div>
               </div>
               <div class="marB15 clearfix"> 
                   <span>
                       <label class="left"><span>条件短信说明 ：</span></label>
                        <textarea id="desc" style="width:542px" class="left form-control" ng-model="addData.desc"></textarea>
                   </span>
               </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary btn-sm" ng-click="editSave()">保存</button>
            </div>
        </div>
    </div>
</div>
</div>

<!-- 添加程序结束 -->
<!-- 编辑程序 -->
<!-- <div class="modal fade" id="modify" tabindex="-1" role="dialog" aria-labelledby="modify">
    <div class="modal-dialog" role="document">
         <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" >修改</h4>
            </div>
            <div class="modal-body">
               <div class="marB15 clearfix row"> 
                   <span class="col-xs-6">
                      <label class="left"><span>条件短信名称 ：</span></label>
                      <input type="text" class="right line4 form-control" ng-model="addData.affixRuleName">
                   </span>
                  <span class="col-xs-6">
                     <label class="left"><span>业务端</span></label>
                     <select class="form-control line4 right" style="height:34px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;" ng-model="addData.svrNode"   ng-options="x.SVR_NODE as x.SVR_NODE_NAME for x in listData1">
                        <option value="">全部</option>
                    </select>
               </span>
               </div>
               <div class="marB15 clearfix row"> 
                  <span class="col-xs-6">
                  <label class="left"><span>短信类型</span></label>
                    <select class="form-control line4 right" style="height:34px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;" ng-model="addData.serviceCode"   ng-options="x.serviceCode as x.serviceName for x in listData2">
                        <option value="">全部</option>
                    </select>
                  </span>
                  <span class="col-xs-6">
                    <label class="left"><span>回复短信 ：</span></label>
                    <input type="text" class="right line4 form-control" ng-model="addData.moSm">
                   </span>
               </div>
               <div class="marB15 clearfix"> 
                   <span>
                       <label class="left"><span>附加短信内容 ：</span></label>
                        <textarea class="left form-control" ng-model="addData.affixSm"></textarea>
                   </span>
               </div>
               <div class="marB15 clearfix"> 
                     <span class="col-xs-6">
                       <label class="left"><span>回复时限 ：</span></label>
                       <input type="text" style="width:30px" onkeyup="value=value.replace(/[^\d]/g,'') " class="form-control line3 left" ng-model="addData.timeLen">&nbsp;小时
                    </span>
                   <div class="col-xs-6">
                       <label class="left"><span>状态 ：</span></label>
                       <select class="form-control line4 right" ng-model="addData.status">
                           <option value="0">待生效</option>
                           <option value="1">生效</option>
                       </select>
                   </div>
               </div>
               <div class="marB15 clearfix"> 
                   <span>
                       <label class="left"><span>条件短信说明 ：</span></label>
                        <textarea class="left form-control" ng-model="addData.desc"></textarea>
                   </span>
               </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary btn-sm" ng-click="editSave()">保存</button>
            </div>
        </div>
    </div>
</div>
</div> -->
<!--编辑程序结束-->                      
<!-- 参数添加结束 -->
<!-- 提示框 -->
<div class="modal fade" id="delete">  
  <div class="modal-dialog">  
    <div class="modal-content message_align">  
      <div class="modal-header">  
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>  
        <h4 class="modal-title">提示信息</h4>  
      </div>  
      <div class="modal-body">  
        <p>您确认删除吗？</p>  
      </div>  
      <div class="modal-footer">  
         <input type="hidden" id="url"/>  
         <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>  
         <a class="btn btn-primary" data-dismiss="modal" ng-click='deleteTr()'>确定</a>  
      </div>  
    </div><!-- /.modal-content -->  
  </div><!-- /.modal-dialog -->  
</div><!-- /.modal -->                         
<!-- 提示框结束 -->
<!-- 加载框 -->
  <span class='loaded' ng-show='loaded'><img  src="img/load.gif"></span>
<!-- 加载框 完成-->